import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

//设备管理
const gateway: AppRouteModule = {
  path: '/device',
  name: 'Device',
  component: LAYOUT,
  redirect: '/device/deviceList',
  meta: {
    orderNo: 20,
    icon: 'ic:baseline-handyman',
    title: t('routes.gateway.device.name'),
  },
  children: [
    {
      path: 'EquipmentList',
      name: 'EquipmentList',
      meta: {
        title: '设备列表',
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/device/equipmentList/index.vue'),
    },
    {
      path: 'SubEquipment',
      name: 'SubEquipment',
      meta: {
        title: '子设备列表',
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/device/subEquipment/index.vue'),
    },
    {
      path: 'subDetail',
      name: 'subDetail',
      component: () => import('/@/views/device/subEquipment/subDetail.vue'),
      meta: {
        title: '子设备详情',
        hideMenu: true,
      },
    },
    {
      path: 'mainDetail',
      name: 'mainDetail',
      component: () => import('/@/views/device/equipmentList/addorediteModel.vue'),
      meta: {
        title: '设备详情',
        hideMenu: true,
      },
    },
    {
      path: 'eqtClass',
      name: 'eqtClass',
      meta: {
        title: '设备分类',
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/eqtClass/index.vue'),
    },
  ],
};

export default gateway;
